/**
 * FileName: UserService Author:   baoy Date:     2018/10/16 16:03 Description:
 */
package com.baoy.xxx.guava.eventbus.spring;

import com.google.common.eventbus.Subscribe;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;


@Slf4j
@Component
public class UserService {

    public String findUsername(String userId) {
        return "baoy";
    }

    @Subscribe
    public void doBusiness(String userId) {
        // do somethings;
        log.info("- do somethings cost time : {}.", System.nanoTime());
    }
}
